﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TH_NguoiDungAdmin.ascx.cs" Inherits="admin_MyUserControls_TH_NguoiDungAdmin" %>
<asp:Label ID="lblStatus" runat="server" CssClass="AdminPageText" 
    Text=""></asp:Label>
<p>
    <asp:Label ID="lblLocation" runat="server" CssClass="AdminPageText" 
        Text="Danh sách các người dùng hiện có"></asp:Label>
</p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
         <asp:GridView ID="grid" runat="server" AutoGenerateColumns="false" 
            DataKeyNames="UserName" onrowcancelingedit="grid_RowCancelingEdit"
            onrowdeleting="grid_RowDeleting" 
            onrowediting="grid_RowEditing" onrowupdating="grid_RowUpdating" 
             onrowdatabound="grid_RowDataBound">  
         <Columns> 
             <asp:TemplateField HeaderText="Tên đăng nhập" 
                    SortExpression="UserName">
                <ItemTemplate>
                    <asp:Label ID="lblUsername" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
                </ItemTemplate>
             </asp:TemplateField> 
             <asp:TemplateField HeaderText="Lần đăng nhập cuối" 
                    SortExpression="lastlogindate">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("lastlogindate") %>'></asp:Label>
                </ItemTemplate>
             </asp:TemplateField> 
 
             <asp:CheckBoxField DataField="IsLockedOut" HeaderText="Disable" 
                    SortExpression="IsLockedOut">
                <ItemStyle HorizontalAlign="Center" />
             </asp:CheckBoxField>
             <asp:CheckBoxField DataField="isonline" HeaderText="Online" 
                    SortExpression="isonline">
                <ItemStyle HorizontalAlign="Center" />
             </asp:CheckBoxField>
             
             <asp:TemplateField HeaderText="Nhóm">
                <ItemTemplate>
                    <asp:Label ID="lblNhom" runat="server" Text=''></asp:Label>
                </ItemTemplate> 
                 <EditItemTemplate>
                     <asp:DropDownList ID="DropDownList1" runat="server">
                         <asp:ListItem Selected="True">Admin</asp:ListItem>
                         <asp:ListItem>Employee</asp:ListItem>
                         <asp:ListItem>Customer</asp:ListItem>
                     </asp:DropDownList>
                 </EditItemTemplate>
             </asp:TemplateField> 
             
             <asp:BoundField  DataField="email" HeaderText="Email" />  
             <asp:CommandField ShowEditButton="True" />
             <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkbtnDelete" CommandArgument='<%#Eval("UserName") %>' CommandName="Delete" runat="server">Delete</asp:LinkButton>
                </ItemTemplate>
             </asp:TemplateField>
         </Columns>  
     </asp:GridView> 
    </ContentTemplate>
</asp:UpdatePanel>

<br />
<br />
